package net.pinnoocle.playadminpc.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.pinnoocle.playcommon.response.BaseResult;
import net.pinnoocle.playdao.entity.page.PageModel;
import net.pinnoocle.playdao.entity.shopPc.ScriptLibraryListPageVo;
import net.pinnoocle.playdao.entity.shopPc.ScriptLibraryListSearchParams;
import net.pinnoocle.playservice.service.impl.ScriptServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ye
 * @Description
 * @create 2021-11-29 9:08
 */
@RestController
@RequestMapping("/script")
@Api(tags = "剧本相关")
public class ScriptController {

    @Autowired
    ScriptServiceImpl scriptService;

    @GetMapping("scriptLibrary")
    @ApiOperation("剧本库")
    public BaseResult<PageModel<ScriptLibraryListPageVo>> scriptLibrary(ScriptLibraryListSearchParams searchParams){
        return new BaseResult<PageModel<ScriptLibraryListPageVo>>().ok(scriptService.scriptLibraryForAdmin(searchParams));
    }
}
